<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}--手机站</title>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
	    <meta http-equiv="pragma" content="no-cache">
	    <meta http-equiv="Cache-Control" content="no-cache;must-revalidate" />
	    <meta http-equiv="expires" content="0" />
	    <meta name="keywords" content="中国小姐,世界小姐,世界小姐中国区,新丝路,新丝路时尚" />
		<meta name="description" content="中国小姐,世界小姐,世界小姐中国区,新丝路,新丝路时尚"/>
		<link rel="stylesheet" type="text/css" href="{JS_PATH}/nsrmodel_h5/css/xsl_lc_m.css">
		<link href="{JS_PATH}/nsrmodel_h5/css/reset.css" type="text/css" rel="stylesheet"/>
		<link href="{JS_PATH}/nsrmodel_h5/css/list_templet.css" type="text/css" rel="stylesheet"/>
		<script src="{JS_PATH}/nsrmodel_h5/js/jquery.1.7.2.min.js"></script>
		<script src="{JS_PATH}/nsrmodel_h5/js/html_reset.js"></script>
		<link rel="stylesheet" type="text/css" href="{JS_PATH}/nsrmodel/css/swiper.min.css">
	</head>
	<body>
	    {template "content_h5","header","nsrmodel"}
		<div class="top-area">
			<img class="banner" src="http://m.nsr.com.cn/resource/uploadfile/column_icon/m21.jpg" />
		</div>
		<div class="nav">
			<p>
				<a href="?m=content&c=index&a=lists&catid=29" class="active">培训招生</a><span>|</span>
				<a href="?m=content&c=index&a=lists&catid=28">培训图集</a>
			</p>  
		</div>
		<div class="wrapper">
			{pc:content action="lists" catid="29" num="10" order="id DESC" page="$page"}
			<div class="edulist">
				{loop $data $r}
				<div class="singleLi">
					<a href="{$r[url]}">
						<div class="train-pic">
							<img src="{$r[thumb]}" />
						</div>
						
						<h3>{$r[title]}</h3>
						<p>{$r['description']}</p>
					</a>
				</div>
				{/loop}
			</div>
			{/pc}
		<input type="hidden" name="page" value="2" />
		</div>
		{template "content_h5","footer_index"}
		<script type="text/javascript">
			//上拉刷新
			$(function(){
			  var tag = 1;
			  var nums = $('.edulist .singleLi').size();
			  if (nums != 10) {
			    tag = 0;
			    $('#game_jzwc').show();
			  }
			  $(window).scroll(function(){  
			    // 被卷去的高度  
			    var scrollTop = document.body.scrollTop||document.documentElement.scrollTop;  
			    // 页面高度  
			    var pageHeight = $(document).height();  
			    // 可视区域高度  
			    var viewHeight = $(window).height();  
			    //alert(viewHeight);  
			    //当滚动到底部时
			    if((scrollTop+viewHeight)>(pageHeight-20) && tag == 1){
			      tag = 0;
			    var catid= <?php echo $catid;?>;
			    var page= $("input[name='page']").val();
			    var pagesize= 10;
			    var order = 'id DESC'
			      $.ajax({
			        type: "POST",
			        url: "index.php?m=content&c=rjson&a=lists",
			        cache: false,
			        dataType:"json",
			        data: {catid:catid, page:page, pagesize:pagesize,order:order},
			        success: function(result){
			          if (result) {
			            if (result.length == 10) {
			              $("input[name='page']").val(parseInt(page)+parseInt(1));
			              tag = 1;
			            } else {
			              tag = 0;
			            }
			            var jsonobj =  result; 
			            var _html = '';
						  for(key in jsonobj){
						      _html +='<div class="singleLi"><a href="';
						      _html +=jsonobj[key]['url'];
						      _html +='"><img src="';
						      _html +=jsonobj[key]['thumb']; 
						      _html +='" /><h3>';
						      _html +=jsonobj[key]['title'];
						      _html +='</h3><p>';
						      _html +=jsonobj[key]['description'];
						      _html +='</p></a></div>';
						  }
			             $(".edulist").append(_html);
			          } else {
			            tag = 0;
			          }
			        },
			        error: function(){
			          alert('请求服务器失败');
			        }
			      }); 
			      //防止无限制的增长
			      if(scrollTop<5000){  
			        return false;     
			      }  
			    }  
			  });
			})
		</script>
	</body>
</html>